<!doctype html>
<html>
<head>
	<title>Basic Coloring</title>
	<script src="../../../codebase/webix.js" type="text/javascript"></script>
	<link rel="STYLESHEET" type="text/css" href="../../../codebase/webix.css">
	<script src="../../common/chartdata.js"></script>
<body>
    <div id="charts" style="width:800px;height:250px;margin:20px"></div>
	<script>
        webix.ui({
            container: "charts",
            cols:[
                {
                    rows:[
                        {
                            template:"<div style='width:100%;text-align:center'>Fixed color</div>",
                            height:40
                        },
                        {
                            view:"chart",
                            type:"bar",
                            barWidth:20,
                            value:"#sales#",
                            gradient:"falling",
                            color:"#b9a8f9",
                            radius:0,
                            alpha:0.5,
                            xAxis:{
                                template:"'#year#"
                            },
                            yAxis:{
                                start:0,
                                end:100,
                                step:10,
                                template:function(obj){

                                    return (obj%20?"":obj)
                                }
                            },
                            data: dataset
                        }
                    ]
                },
                {
                    rows:[
                        {
                            template:"<div style='width:100%;text-align:center'>Color template</div>",
                            height:40
                        },
                        {
                            view:"chart",
                            type:"bar",
                            value:"#sales#",
                            color:"#color#",
                            border:true,
                            barWidth:20,
                            radius:0,
                            xAxis:{
                                template:"'#year#"
                            },
                            yAxis:{
                                start:0,
                                end:100,
                                step:10,
                                template:function(obj){

                                    return (obj%20?"":obj)
                                }
                            },
                            data: dataset_colors
                        }
                    ]
                }
            ]

        });
	</script>
</body>
</html>
